import jakarta.servlet.ServletContextEvent;
import jakarta.servlet.ServletContextListener;
import jakarta.servlet.annotation.WebListener;

//@WebListener
public class MyListener2 implements ServletContextListener  {
    @Override
    public void contextInitialized(ServletContextEvent sce) {
        System.out.println("ServletContex对象创建了");
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {
        System.out.println("ServletContext销毁了");
    }
}
